﻿using Loki.Utils;
namespace Loki.Engine
{
    /// <summary>
    /// Base class for entities.
    /// </summary>
    public abstract class Entity<TModel> : TrackedObject, IApplicationModelAware<TModel>
    {
        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="Entity&lt;TModel&gt;"/> class.
        /// </summary>
        public Entity()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Entity&lt;TModel&gt;"/> class.
        /// </summary>
        /// <param name="P_Clone">The clone.</param>
        public Entity(Entity<TModel> P_Clone)
            : base(P_Clone)
        {

        }
        #endregion

        #region Model
        /// <summary>
        /// Gets the application model.
        /// </summary>
        /// <value>
        /// The application model.
        /// </value>
        public TModel ApplicationModel
        {
            get { return ContextHelper.GetApplicationModel<TModel>(); }
        }
        #endregion
    }
}
